/*
Copyright (C) 2009-2010 Xanadu Development Team

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#pragma once

#define Beginner_skill(skillid) ((skillid / 1000000) == (skillid < 10000000 ? 0 : 10))
#define Skill_job(skillid) ((skillid / 100000 % 10 == 0) ? ((skillid / 1000000 == 0) ? 0 : 1) : ((skillid / 10000) % 10 + 2))
#define isFourthJob(skillid) ((skillid / 10000) % 10 == 2)

#include <hash_map>
using namespace stdext;

class Player;
class Skill;

class PlayerSkills{
private:
	Player* player;
	hash_map <int, Skill*> skills;
public:
	~PlayerSkills();
	PlayerSkills(Player* player){
		this->player = player;
	}
	hash_map<int, Skill*>* getSkillsInfo(){
		return &skills;
	}
	void useAttackSkill(int skillid);
	void addSkill(Skill* skill);
	int getSkillsCount();
	int getSkillLevel(int skillid);
	int getMpEater();
	short getMasteryBonus();
	Skill* getSkill(int skillid);
	int getincHPID();
	int getincMPID();
};